package org.example;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main2 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
        People u=(People)context.getBean("user") ;
        System.out.println(u);
        System.out.println("姓名"+u.getName());
        System.out.println("性别"+u.getSex().getBrand());
        System.out.println("年龄"+u.getAge().getBrand());


    }
}